<?php if(count($mycareer) < 3){
    ?>

<div class="contentBody">

    <div class="left">
    <br/>
<h2><u>Career Selection</u></h2>
<a href="<?php echo site_url('career_display/display_career') ?>"id="mycareer" onmouseover="this.style.color='#1569C7'" onmouseout="this.style.color='#FF8040'" style="color:#FF8040" >My Career list</a>


<!--Search for course-->
<div id="courseSearch" style="margin-left:40px;">
<form name="searchform" action="<?php echo site_url('career_display/searchkeyword') ?>" method="POST">
    <table>
        <tr>
            <th>Search Career by Keyword</th>
            <td><select name="cate" id="cate">
                    <option value="career_name" >Career</option>
                    <option value="career_description" >Career Description</option>
                </select></td>
            <td><input type="text" id="keyword" name="keyword" size="20"></td>
            <td><input name="submitcourseSearch" id="Filter" value="Filter" type="submit"></td>
        </tr>
    </table>
</form>
</div>

<!--Search result - Retrieve the data from database and display the result-->

        <div id="searchResult" class="left">

<!--            Display the search result-->
                    <form id="insForm" action="<?php echo site_url('career_display/selcareer') ?>" method="post">
                        <div style="margin-left:5px;">
                    <br>
        <input type="button" id="checkAll" name="checkAll" value="Mark All/Un-mark All">
                            <input type="submit" value="Select Career" name="selectCarConfirm" id="selectCarConfirm">
                            </div>
                        <div style="margin-left:5px; margin-top:30px">
                            <h2><label id="keyword"><?php echo "<b style=color:red;>Your Keyword : " . $_POST['keyword'] . "</b>"; ?></label></h2>
                    <table id="table_career"  width="600px" border="1px" cellspacing="0px">
                        <thead>
                            <tr>
                                <th> </th>
                                <th>Career</th>
                                <th>Career Category</th>
                                <th>Career Description</th>
                                <th>Riasec code</th>
                            </tr>
                        </thead>
                        <tbody>
                        <?php
                            foreach($searchkey as $row){

                        ?>

                            <tr>
                                <td width="20px"><input type="checkbox" name="career_id[]" id="career_id" value="<?php echo $row->career_id; ?>">
                                  </td>
                                <td><?php echo $row->career_name; ?></td>
                                <td><?php echo $row->career_category; ?></td>
                                <td><?php echo $row->career_description; ?></td>
                                <td><?php echo $row->riasec_code; ?></td>
                            </tr>

                        <?php
                           }
                        ?>
                            </tbody>
             </table>
                            </div>
             </form>


</div>
    </div>
</div>

<?php }else{?>

<div class="contentBody">

    <div class="left">
    <br/>
<h2><u>Career Selection</u></h2>
<br />
<p>You have exceed the maximum No. for selecting career</p>
<br/>
<a href="<?php echo site_url('career_display/display_career') ?>"id="mycareer" onmouseover="this.style.color='#1569C7'" onmouseout="this.style.color='#FF8040'" style="color:#FF8040" >My Career list</a>


<!--Search for course-->
<div id="courseSearch" style="margin-left:40px;">
<form name="searchform" action="<?php echo site_url('career_display/searchkeyword') ?>" method="POST">
    <table>
        <tr>
            <th>Search Career by Keyword</th>
            <td><select name="cate" id="cate">
                    <option value="career_name" >Career</option>
                    <option value="career_description" >Career Description</option>
                </select></td>
            <td><input type="text" id="keyword" name="keyword" size="20"></td>
            <td><input name="submitcourseSearch" id="Filter" value="Filter" type="submit"></td>
        </tr>
    </table>
</form>
</div>

<!--Search result - Retrieve the data from database and display the result-->

        <div id="searchResult" class="left">

<!--            Display the search result-->
                    <table id="table_ins" class="tablesorter" width="600px" border="1px" id="infoTable" cellspacing="0px">
                        <thead>
                            <tr>
                                <th>Career</th>
                                <th>Career Category</th>
                                <th>Career Description</th>
                                <th>Riasec code</th>
                            </tr>
                        </thead>
                        <tbody>
                        <?php
                            foreach($searchkey as $row){

                        ?>

                            <tr>
                                <td><?php echo $row->career_name; ?></td>
                                <td><?php echo $row->career_category; ?></td>
                                <td><?php echo $row->career_description; ?></td>
                                <td><?php echo $row->riasec_code; ?></td>
                            </tr>

                        <?php
                           }
                        ?>
                            </tbody>
             </table>
                            </div>


</div>
    </div>
</div>

<?php
}?>